#define _CRT_SECURE_NO_WARNINGS 1
#include "SList.h"

void test01()
{
	SLNode* phead = NULL;
	/*SLPushBack(&phead, 1);
	SLPushBack(&phead, 2);
	SLPushBack(&phead, 3);
	SLPushBack(&phead, 4);
	SLPushBack(&phead, 5);*/

	SLPushFront(&phead, 1);
	SLPushFront(&phead, 2);
	SLPushFront(&phead, 3);
	SLPushFront(&phead, 4);
	SLPushFront(&phead, 5);
	SLPushFront(&phead, 6);
	SLPushFront(&phead, 7);
	SLPushFront(&phead, 8);
	SLPrint(phead);

	SLNode* pos = SLFind(&phead, 4);
	SLErase(&phead, pos);
	SLPrint(phead);

	pos = SLFind(&phead, 2);
	SLEraseAfter(&phead, pos);
	SLPrint(phead);

	SLDestroy(&phead);
}
int main()
{
	test01();
	return 0;
}